import request from '@/utils/request'

/**
 * 分页查询
 * @param {formData} data data
 */
export function getShopAfterInfo(data) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive/page`,
    method: 'POST',
    data
  })
}

/**
 * 门店售后档案新增
 * @param {obj} data dto
 */
export function addShopAfterInfo(data) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive`,
    method: 'POST',
    data
  })
}

/**
 * 门店售后档案修改
 * @param {obj} data dto
 */
export function updeteShopAfter(data) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive`,
    method: 'PUT',
    data
  })
}

/**
 * 根据ID查询
 * @param {string} id 门店档案ID
 */
export function findShopAfterById(id) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive/${id}`,
    method: 'GET'
  })
}

/**
 * 删除
 * @param {string} id 门店档案ID
 */
export function deleteShopAfterById(id) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive/${id}`,
    method: 'DELETE'
  })
}

/**
 * 批量删除
 * @param {array} data 门店ID集合
 */
export function deleteShopAfter(data) {
  return request({
    url: `/call-center/api/v1/customerAfterSaleArchive/deleteBatch`,
    method: 'DELETE',
    data
  })
}
